/// 小组详情
class GroupDetailResponse {
  int? groupId;
  String? groupName;
  String? intro;
  String? cover;
  int? joinFlag; // 是否已加入小组；0.否；1.是
  int? creatorFlag; // 是否是创建者；0.否；1.是
  int? memberNum;
  int? noteNum;
  int? commentNum;

  GroupDetailResponse({
    this.groupId,
    this.groupName,
    this.intro,
    this.cover,
    this.memberNum,
    this.joinFlag,
    this.creatorFlag,
    this.noteNum,
    this.commentNum,
  });

  factory GroupDetailResponse.fromJson(Map<String, dynamic> json) {
    return GroupDetailResponse(
      groupId: json['groupId'] as int?,
      groupName: json['groupName'] as String?,
      intro: json['intro'] as String?,
      cover: json['cover'] as String?,
      memberNum: json['memberNum'] as int?,
      joinFlag: json['joinFlag'] as int?,
      creatorFlag: json['creatorFlag'] as int?,
      noteNum: json['noteNum'] as int?,
      commentNum: json['commentNum'] as int?,
    );
  }

  Map<String, dynamic> toJson() => {
        'groupId': groupId,
        'groupName': groupName,
        'intro': intro,
        'cover': cover,
        'memberNum': memberNum,
        'joinFlag': joinFlag,
        'creatorFlag': creatorFlag,
        'noteNum': noteNum,
        'commentNum': commentNum,
      };
}
